<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
    <div class=""id="app">
        <!-- v-for 第一项是键，第二项是下标 -->
        <div class=""  v-for="(item,index) of arr" @click="handleClick(index)">{{item}}{{index}}</div>
    </div>
    <script>
        new Vue({
            el:"#app",
            data:{
                arr:[
                    {name:"zz",id:1001},
                    {name:"cc",id:1002},
                    {name:"bb",id:1003},
                ]
            },
            methods:{
                handleClick(index){
                    this.arr.splice(index,1)
                }
            }
        })
    </script>
</body>
</html>